<script type="text/javascript">

var xzhouval = "";
$(document).ready(function(){
	$("input[type='checkbox']").click(function(){
		var name = $(this).attr("name");
		var id = $(this).attr("data_id");
		var selecttype = $(this).attr("selecttype");
		var othertype = $(this).attr("othertype");
		var flag = $(this).prop("checked");
		if(selecttype=="radio"){
			$("input[name='"+name+"']").attr("checked",false);	
			$(this).prop("checked",flag);
			if(xzhouval!=$(this).attr("data_id")){
				$("#xzhou"+xzhouval).attr("disabled",false);
				$("#weidu"+xzhouval).attr("disabled",false);
				$("#zhibiao"+xzhouval).attr("disabled",false);
			}
			xzhouval = $(this).attr("data_id");
		}
		if(othertype=="disabled"){
			if(flag){
				$("#xzhou"+id).attr("disabled",true);
				$("#weidu"+id).attr("disabled",true);
				$("#zhibiao"+id).attr("disabled",true);
			}else{
				$("#xzhou"+id).attr("disabled",false);
				$("#weidu"+id).attr("disabled",false);
				$("#zhibiao"+id).attr("disabled",false);
			}
			
			$(this).attr("disabled",false);
		}
	});
});
</script>
<div class="artCon">
	<div class="middleArt">
	<form class="form-horizontal" id="mainForm" action="/${orgi}/manage/system/catagoryaddo.html" data-toggle="form" method="post">
		<div class="artMain">
			<div class="mainCenter"> 
				<table class="data_table_1">
					<tbody><tr>
						<th>图表X轴：</th>
						<th>图表维度：</th>
						<th>图表指标：</th>
					</tr>
					
					<tr>
						
						<td>
							<div style="max-height:300px;min-height: 200px;" class="tableScrollWrap">
								 <table class="table_style_1 table-bordered">
									<thead>
										<tr>
											<th style="width:20px;">&nbsp;</th>
											<th style="width:70%">名称</th>
											<th>位置</th>
										</tr>
									</thead>
									<tbody>
									<#if reportModel?? && reportModel.rowdimension??>
									<#list reportModel.rowdimension?split(",") as row>
										<#if cube?? && cube.dimension??>
											<#list cube.dimension as dim>
												<#list dim.cubeLevel as level>
												<#if row == level.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="xzhou" id="xzhou${level.name!''}hang" data_id="${level.name!''}hang" selecttype="radio" othertype="disabled" value="${level.name!''}" > </td>
													<td style="height:20px !important;width:80%">${level.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">行</td>
												</tr>
												</#if>
											</#list>
											</#list>
										</#if>
									</#list>
									</#if>
									
									
									<#if reportModel?? && reportModel.coldimension??>
									<#list reportModel.coldimension?split(",") as col>
										<#if cube?? && cube.dimension??>
											<#list cube.dimension as dim>
												<#list dim.cubeLevel as level>
												<#if col == level.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="xzhou" id="xzhou${level.name!''}lie" data_id="${level.name!''}lie" selecttype="radio" othertype="disabled" value="${level.name!''}" > </td>
													<td style="height:20px !important;width:80%">${level.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">列</td>
												</tr>
												</#if>
											</#list>
											</#list>
										</#if>
									</#list>
									</#if>
									
									<#if reportModel?? && reportModel.measure??>
									<#list reportModel.measure?split(",") as mid>
										<#if cube?? && cube.measure??>
											<#list cube.measure as measure>
												<#if mid == measure.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="xzhou" id="xzhou${measure.name!''}zhi" data_id="${measure.name!''}zhi" selecttype="radio" othertype="disabled" value="${measure.name!''}" > </td>
													<td style="height:20px !important;width:80%">${measure.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">指标</td>
												</tr>
												</#if>
											</#list>
										</#if>
									</#list>
									</#if>
									
									
									<#if newCol??>
									<#list newCol as col>
										<#if col.type == "colrow" || col.type == "rowcol">
										<tr>
											<td style="height:20px !important;width:20px;"><input type="checkbox" name="xzhou" id="xzhou${col.name!''}${col.type!''}" data_id="${col.name!''}${col.type!''}" selecttype="radio" othertype="disabled" value="${col.name!''}" > </td>
											<td style="height:20px !important;width:80%">${col.name!''}</td>
											<td nowrap="nowrap" style="height:20px !important;"><#if col.type == 'colrow'>汇总列<#else>汇总行</#if></td>
										</tr>
										</#if>
									</#list>
									</#if>
										
									</tbody>
								</table>
							</div>
						</td>
						<td>
							<div style="max-height:300px;min-height: 200px;" class="tableScrollWrap">
								 <table class="table_style_1 table-bordered">
									<thead>
										<tr>
											<th style="width:20px;">&nbsp;</th>
											<th style="width:70%">名称</th>
											<th>位置</th>
										</tr>
									</thead>
									<tbody>
									<#if reportModel?? && reportModel.rowdimension??>
									<#list reportModel.rowdimension?split(",") as row>
										<#if cube?? && cube.dimension??>
											<#list cube.dimension as dim>
												<#list dim.cubeLevel as level>
												<#if row == level.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="weidu" id="weidu${level.name!''}hang" data_id="${level.name!''}hang" selecttype="checkbox" othertype="disabled" value="${level.name!''}"> </td>
													<td style="height:20px !important;width:80%">${level.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">行</td>
												</tr>
												</#if>
											</#list>
											</#list>
										</#if>
									</#list>
									</#if>
									
									
									<#if reportModel?? && reportModel.coldimension??>
									<#list reportModel.coldimension?split(",") as col>
										<#if cube?? && cube.dimension??>
											<#list cube.dimension as dim>
												<#list dim.cubeLevel as level>
												<#if col == level.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="weidu" id="weidu${level.name!''}lie" data_id="${level.name!''}lie" selecttype="checkbox" othertype="disabled" value="${level.name!''}"> </td>
													<td style="height:20px !important;width:80%">${level.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">列</td>
												</tr>
												</#if>
											</#list>
											</#list>
										</#if>
									</#list>
									</#if>
									
									<#if reportModel?? && reportModel.measure??>
									<#list reportModel.measure?split(",") as mid>
										<#if cube?? && cube.measure??>
											<#list cube.measure as measure>
												<#if mid == measure.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="weidu" id="weidu${measure.name!''}zhi" data_id="${measure.name!''}zhi" selecttype="checkbox" othertype="disabled" value="${measure.name!''}" > </td>
													<td style="height:20px !important;width:80%">${measure.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">指标</td>
												</tr>
												</#if>
											</#list>
										</#if>
									</#list>
									</#if>
									
									
									<#if newCol??>
									<#list newCol as col>
										<#if col.type == "colrow" || col.type == "rowcol">
										<tr>
											<td style="height:20px !important;width:20px;"><input type="checkbox" name="weidu" id="weidu${col.name!''}${col.type!''}" data_id="${col.name!''}${col.type!''}" selecttype="checkbox" othertype="disabled" value="${col.name!''}"> </td>
											<td style="height:20px !important;width:80%">${col.name!''}</td>
											<td nowrap="nowrap" style="height:20px !important;"><#if col.type == 'colrow'>汇总列<#else>汇总行</#if></td>
										</tr>
										</#if>
									</#list>
									</#if>
										
									</tbody>
								</table>
							</div>
						</td>
						<td>
							<div style="max-height:300px;min-height: 200px;" class="tableScrollWrap">
								 <table class="table_style_1 table-bordered">
									<thead>
										<tr>
											<th style="width:20px;">&nbsp;</th>
											<th style="width:70%">名称</th>
											<th>位置</th>
										</tr>
									</thead>
									<tbody>
									<#if reportModel?? && reportModel.rowdimension??>
									<#list reportModel.rowdimension?split(",") as row>
										<#if cube?? && cube.dimension??>
											<#list cube.dimension as dim>
												<#list dim.cubeLevel as level>
												<#if row == level.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="zhibiao" id="zhibiao${level.name!''}hang" data_id="${level.name!''}hang" selecttype="checkbox" othertype="disabled" value="${level.name!''}"> </td>
													<td style="height:20px !important;width:80%">${level.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">行</td>
												</tr>
												</#if>
											</#list>
											</#list>
										</#if>
									</#list>
									</#if>
									
									
									<#if reportModel?? && reportModel.coldimension??>
									<#list reportModel.coldimension?split(",") as col>
										<#if cube?? && cube.dimension??>
											<#list cube.dimension as dim>
												<#list dim.cubeLevel as level>
												<#if col == level.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="zhibiao" id="zhibiao${level.name!''}lie" data_id="${level.name!''}lie" selecttype="checkbox" othertype="disabled" value="${level.name!''}"> </td>
													<td style="height:20px !important;width:80%">${level.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">列</td>
												</tr>
												</#if>
											</#list>
											</#list>
										</#if>
									</#list>
									</#if>
									
									<#if reportModel?? && reportModel.measure??>
									<#list reportModel.measure?split(",") as mid>
										<#if cube?? && cube.measure??>
											<#list cube.measure as measure>
												<#if mid == measure.id>
												<tr>
													<td style="height:20px !important;width:20px;"><input type="checkbox" name="zhibiao" id="zhibiao${measure.name!''}zhi" data_id="${measure.name!''}zhi" selecttype="checkbox" othertype="disabled" value="${measure.name!''}"> </td>
													<td style="height:20px !important;width:80%">${measure.name!''}</td>
													<td nowrap="nowrap" style="height:20px !important;">指标</td>
												</tr>
												</#if>
											</#list>
										</#if>
									</#list>
									</#if>
									
									
									<#if newCol??>
									<#list newCol as col>
										<#if col.type == "colrow" || col.type == "rowcol">
										<tr>
											<td style="height:20px !important;width:20px;"><input type="checkbox" name="zhibiao" id="zhibiao${col.name!''}${col.type!''}" data_id="${col.name!''}${col.type!''}" selecttype="checkbox" othertype="disabled" value="${col.name!''}"> </td>
											<td style="height:20px !important;width:80%">${col.name!''}</td>
											<td nowrap="nowrap" style="height:20px !important;"><#if col.type == 'colrow'>汇总列<#else>汇总行</#if></td>
										</tr>
										</#if>
									</#list>
									</#if>
										
									</tbody>
								</table>
							</div>
						</td>
					</tr>
					
				</tbody></table>

			</div>
		</div>
		<div class="bottomBg">
			<div class="btnWrap">
				<input type="submit" class="subButtonStyle" value="确认"/>
				<input type="button" onclick="closeR3ArtDialog()" class="cancelButtonStyle" value="取消"/>
			</div>
		</div>
	</form>
	</div>
</div>
